package br.com.daniele.util;

import java.io.File;
import java.io.FilenameFilter;
import java.text.NumberFormat;

public class DeleteAllXml implements FilenameFilter {

	private File file;

	public DeleteAllXml(File file) {
		this.file = file;
	}
	
	public static void main(String[] args) {
		
		String v = "14206.40";
		
		System.out.println(NumberFormat.getCurrencyInstance().format(Double.valueOf(v)));
		
		
		
	}

	public boolean accept(File dir, String name) {

		name = name.toLowerCase();
		
		if (name.endsWith(".xml")) {
			return dir.delete();			
		}
		
		return false;		
	}
	
	
	public void deleteXMLFile(){
		
		accept(file, file.getName());		
		
	}
	
	

}
